package com.htl.exampro.base.exception;


/**
 * 通用错误信息
 */
public enum CommonError {

    UNKOWN_ERROR(500001, "执行过程异常，请重试。"),
    PARAMS_ERROR(400001, "非法参数"),
    OBJECT_NULL(404001, "对象为空"),
    QUERY_NULL(404002, "查询结果为空"),
    REQUEST_NULL(400002, "请求参数为空"),

    ;

    private final int code;
    private final String message;

    public String getMessage() {
        return message;
    }

    public int getCode() {
        return code;
    }

    CommonError(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
